/**
 * 定义站点信息管理模块
 */
(function(window, angular, undefined){
	var Module = angular.module('water.apps.nanshan.systemConfig.user.nanshanUserManager', ['SafeDataModule','itfreer']);
	
	Module.controller('nanshanUserManagerController',function($rootScope,$scope,$controller,$formObject){

		var control = $controller("SafeDataController",{$scope:$scope});
		
		$scope.getUserRole = function(userId,orgId){
			var queryObj = {
				userId:userId,
				orgId:"nanshanqu"
			};
			$waterDataCommon.getPageRows("/BaseInfo/queryUserRole.do","userRole",queryObj,1,1,function(data){
				$scope.roleList = data;
			});
		}
		
		/**
		 * 重写保存方法，默认机构为珠海
		 */
		$scope.saveUserOver = function(){
			$formObject.user.editRow.S_ORGID = "nanshanqu";
			$scope.saveUser();
		}
	});
}(window, angular));	